# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=uniscan
pkgver=6.3
pkgrel=7
groups=('blackarch' 'blackarch-fuzzer' 'blackarch-scanner' 'blackarch-webapp')
pkgdesc='A simple Remote File Include, Local File Include and Remote Command Execution vulnerability scanner.'
url='http://sourceforge.net/projects/uniscan/'
arch=('any')
license=('GPL2')
depends=('perl' 'perl-moose' 'perl-lwp-protocol-https'
         'perl-devel-overloadinfo')
source=("http://downloads.sourceforge.net/project/uniscan/6.2/uniscan6.2.tar.gz")
sha512sums=('2d5484d3b9f2268a0d63731a9940cf307f8d397d0d9b0ef59f36e3924c24f5b5a7b86d05287b6e06eb98002a1f8e291f899b1a462f2e8a25d100c78f96e4f8cc')

package() {
  cd "${pkgname}6.2"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -a --no-preserve=ownership * "$pkgdir/usr/share/$pkgname/"

cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec perl -I. uniscan.pl "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

